from Base.base import Base
from selenium.webdriver.common.by import By
import os
from utils.data_header import read_yaml
class Page6(Base):
    current_dir = os.path.dirname(__file__)
    test_case = read_yaml(os.path.join(current_dir, '..', 'Config', 'endpoints.yaml'))
    case = test_case[5]

    manage_loc=(By.XPATH,case['manage_loc'])
    def manage(self):
        self.click(self.manage_loc)

    peizhi_loc=(By.XPATH,case['peizhi_loc'])
    def peizhi(self):
        self.click(self.peizhi_loc)

    bangdin_loc=(By.XPATH,case['bangdin_loc'])
    def bangdin(self):
        self.click(self.bangdin_loc)

    userhao_loc=(By.XPATH,case['userhao_loc'])
    def userhao(self,bh):
        self.send_keys(self.userhao_loc,bh)

    username_loc=(By.XPATH,case['username_loc'])
    def username(self,text):
        self.send_keys(self.username_loc,text)

    AccountName_loc=(By.XPATH,case['AccountName_loc'])
    def account(self):
        self.send_keys(self.AccountName_loc,'张三')

    bankhao_loc=(By.XPATH,case['bankhao_loc'])
    def bankhao(self,text):
        self.send_keys(self.bankhao_loc,text)

    cardhao_loc=(By.XPATH,case['cardhao_loc'])

    def cardhao(self):
        self.send_keys(self.cardhao_loc,'23498545684403')

    mobile_loc=(By.XPATH,case['mobile_loc'])

    def mobile(self):
        self.send_keys(self.mobile_loc,'16484638849')

    address_loc=(By.XPATH,case['address_loc'])

    def address(self):
        self.send_keys(self.address_loc,'北京昌平')

    commit_loc=(By.XPATH,case['commit_loc'])

    def commit(self):
        self.click(self.commit_loc)


